package com.elvin.platform.beans;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 组织表
 */
@TableName("organize")
public class Organize extends Model<Organize> {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String code;//组织编码
    private String name;//组织名称
    private Long parentId;//父类ID
    private String account;//组织机构登录账户名
    private String password;//组织机构登录账户密码
    private String comment;//备注
    @ApiModelProperty(value = "创建日期", required =false,hidden=true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh",timezone = "GMT+8")
    private Date createTime;
    @ApiModelProperty(hidden=true)
   // @TableField(exist = false)
    @JsonIgnore
    private String dictionaryInfo;

  public String getDictionaryInfo() {
    return dictionaryInfo;
  }

  public void setDictionaryInfo(String dictionaryInfo) {
    this.dictionaryInfo = dictionaryInfo;
  }

  public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    @Override
    public String toString() {
        return "Organize{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", parentId=" + parentId +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", comment='" + comment + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
